﻿/** 
 * Copyright / Licence
 * <p>
 * You are free:
 * <li>to Share — to copy, distribute and transmit the work
 * <li>to Remix — to adapt the work
 * </p>
 * <p>
 * Under the following conditions:
 * <li>Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
 * <li>Noncommercial — You may not use this work for commercial purposes.
 * <li>Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * </p>
 * <p>
 * More information can be found here:
 * <br/>
 * http://creativecommons.org/licenses/by-nc-sa/3.0/
 * </p>
 * <p>
 * Please contact Manfred Weber [manfred.weber@gmail.com] if you require a commercial licence
 * </p>
 */
 package org.dschini.data.ui.maps.world {
	
	import org.dschini.utils.*;
	import org.dschini.data.ui.maps.*;
	import org.dschini.data.ui.maps.world.northamerica.*;
	
	public class NorthAmericaMapData extends MapData
	{
	
		public var azoresMapData:AzoresMapData;
		public var alaskaMapData:AlaskaMapData;
		public var hawaiiMapData:HawaiiMapData;
		public var canadaMapData:CanadaMapData;
		public var greenlandMapData:GreenlandMapData;
		public var cubaMapData:CubaMapData;
		public var bahamasMapData:BahamasMapData;
		public var jamaicaMapData:JamaicaMapData;
		public var portAuPrinceMapData:PortAuPrinceMapData;
		public var dominicanRepublicMapData:DominicanRepublicMapData;
		public var puertoRicoMapData:PuertoRicoMapData;
		public var guadeloupeMapData:GuadeloupeMapData;
		public var martiniqueMapData:MartiniqueMapData;
		public var belizeMapData:BelizeMapData;
		public var guatemalaMapData:GuatemalaMapData;
		public var elSalvadorMapData:ElSalvadorMapData;
		public var hondurasMapData:HondurasMapData;
		public var nicaraguaMapData:NicaraguaMapData;
		public var costaRicaMapData:CostaRicaMapData;
		public var panamaMapData:PanamaMapData;
		public var mexicoMapData:MexicoMapData;
		public var usaMapData:UsaMapData;

		public function NorthAmericaMapData():void
		{
			_title = "<undefined>";
			locationData = new ExtendedArray();
			countries = new Array();
			backgroundVisible = false;
			countryLinesVisible = true;
			shapeVisible = true;
			
			azoresMapData = new AzoresMapData();
			alaskaMapData = new AlaskaMapData();
			hawaiiMapData = new HawaiiMapData();
			canadaMapData = new CanadaMapData();
			greenlandMapData = new GreenlandMapData();
			cubaMapData = new CubaMapData();
			bahamasMapData = new BahamasMapData();
			jamaicaMapData = new JamaicaMapData();
			portAuPrinceMapData = new PortAuPrinceMapData();
			dominicanRepublicMapData = new DominicanRepublicMapData();
			puertoRicoMapData = new PuertoRicoMapData();
			guadeloupeMapData = new GuadeloupeMapData();
			martiniqueMapData = new MartiniqueMapData();
			belizeMapData = new BelizeMapData();
			guatemalaMapData = new GuatemalaMapData();
			elSalvadorMapData = new ElSalvadorMapData();
			hondurasMapData = new HondurasMapData();
			nicaraguaMapData = new NicaraguaMapData();
			costaRicaMapData = new CostaRicaMapData();
			panamaMapData = new PanamaMapData();
			mexicoMapData = new MexicoMapData();
			usaMapData = new UsaMapData();
			
			countries = [
				azoresMapData,
				alaskaMapData,
				hawaiiMapData,
				canadaMapData,
				greenlandMapData,
				cubaMapData,
				bahamasMapData,
				jamaicaMapData,
				portAuPrinceMapData,
				dominicanRepublicMapData,
				puertoRicoMapData,
				guadeloupeMapData,
				martiniqueMapData,
				belizeMapData,
				guatemalaMapData,
				elSalvadorMapData,
				hondurasMapData,
				nicaraguaMapData,
				costaRicaMapData,
				panamaMapData,
				mexicoMapData,
				usaMapData
			]
		}
		
		override public function set lang( lang:String ):void
		{
			_lang = lang;
			switch( _lang ){
				case "en":
					_title = "North America";
					break;
				case "de":
					_title = "Nord Amerika";
					break;
			}
			var i:int;
			for(i=0; i<countries.length; i++){
				MapData(countries[i]).lang = lang;
			}
			for(i=0; i<locationData.length; i++){
				MapLocationData(locationData[i]).lang = lang;
			}
		}
	}
}
